/**
 * 
 */
package com.ls.lserp.modules.sys.dao;

import java.util.Date;
import java.util.List;

import com.ls.lserp.common.persistence.CrudDao;
import com.ls.lserp.common.persistence.annotation.MyBatisDao;
import com.ls.lserp.dbaccess.Entity.MailMessage;
import com.ls.lserp.dbaccess.Entity.MaterialBreak;
import com.ls.lserp.dbaccess.Entity.MaterialRemainEntity;
import com.ls.lserp.modules.sys.entity.Menu;
import com.ls.lserp.modules.sys.entity.OrderQualityCount;
import com.ls.lserp.modules.sys.entity.QualityCount;

/**
 * 菜单DAO接口
 * @author 
 * @version 2014-05-16
 */
@MyBatisDao
public interface MenuDao extends CrudDao<Menu> {

	public List<Menu> findByParentIdsLike(Menu menu);

	public List<Menu> findByUserId(Menu menu);
	
	public int updateParentIds(Menu menu);
	
	public int updateSort(Menu menu);
	// 统计质检数量 
	public  List<QualityCount> getQualityCount(Date beginDate,Date endDate);
	// 统计订单数量 
	//public  OrderQualityCount getOrderQualityCount(Date searchDate);
	public  List<OrderQualityCount> getOrderQualityCount(Date beginDate,Date endDate);
	
	// 邮件信息一览
	public List<MailMessage> getMailMessage();
	
	// 查询当前登录人的组别
	public int getGroupId(long userId); 
	
	// 面料断料信息一览
	public List<MaterialBreak> getMaterialBreak();
	
	
	// 按条件检索面料断料信息一览
	public List<MaterialBreak> searchMaterialBreak(String contactNo,int makeFlag);
	
	// 按条件检索所有订单数据
	public List<MaterialBreak> searchMaterialAllList(String contactNo,String materialName,int makeFlag);
	
	// 按条件检索未断料的订单数据
	public List<MaterialBreak> searchMaterialUnbreak(String contactNo,String materialName,int makeFlag);
	
	// 更新状态
	public void updateStatus(String styleId,String optionItemId);
	
	//查询料头是否存在
	MaterialRemainEntity findMaterialRemain(MaterialRemainEntity materialRemainEntity);
	
	//插入料头表
	void insertMaterialRemain(MaterialRemainEntity materialRemainEntity);
	
	//更新增加料头数量
	void updateMaterialRemainAdd(MaterialRemainEntity materialRemainEntity);
	
	//更新减少料头数量
	void updateMaterialRemainSub(MaterialRemainEntity materialRemainEntity);
	
}
